import http from '../index'


export const selectAll = () => http({
    url: '/api/company/selectAll',
    method: 'get',

})

export const selectByUserId = (params) => http({
    url: '/api/company/selectByUserId?' + params,
    method: 'get',
})

export const selectByName = (params) => http({
    url: '/api/company/selectByName?' + params,
    method: 'get',

})

export const correlation = (data) => http({
    url: '/api/company/correlation',
    method: 'post',
    data
})

export const correlationId = (params) => http({
    url: '/api/company/selectCompanyIdByUserId?' + params,
    method: 'get',

})

export const add = (data) => http({
    url: '/api/company/add',
    method: 'post',
    data

})

export const correlationParent = (data) => http({
    url: '/api/company/correlationParent',
    method: 'post',
    data

})

export const del = (params) => http({
    url: '/api/company/delete/?' + params,
    method: 'delete',
})

export const updateInformation = (data) => http({
    url: '/api/company/updateInformation',
    method: 'put',
    data
})

export const logoUpload = (data) => http({
    url: '/api/company/logoUpload',
    method: 'post',
    data
})

export const officialSealUpload = (data) => http({
    url: '/api/company/officialSealUpload',
    method: 'post',
    data
})

export const gzhUpload = (data) => http({
    url: '/api/company/gzhUpload',
    method: 'post',
    data
})

export const open = (params) => http({
    url: '/api/company/enableFunction?'+params,
    method: 'get'
})
export const close = (params) => http({
    url: '/api/company/disableFunction?'+params,
    method: 'get'
})

export const selectByUserId2 = () => http({
  url: '/api/company/selectByUserId2',
  method: 'get',
})
